<extend name="Base/common"/>
<block name="style">
<link href="__CSS__/lyz.calendar.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	p{
		width: 90%;
		height: 30px;
		line-height: 30px;
		text-align: left;
		margin-top:10px; 
		padding-bottom: 2%;
		color: #10AEFF;

	}
	p span{
		width: 25%;
		height: 40px;
		background: #EDEDED;
		border:1px solid #ccc;
		border-right: none;
		line-height: 40px;
		text-align: center;
		float: left;
	}


	table{

	font-size: 12px;

	font-family: "微软雅黑", "宋体", "Arial Narrow";
	
	}
	table th{
	padding:0px;
	border:none;
	}
	table td{
	padding:0px;
	
	}
	.table{
		font-size: 12px;
		text-align: center;
		line-height: 30px;

	}

	.top .line{
		width: 100%;
		height: 0px;
		border-bottom: 1px dashed #999;
		margin-left: 0;
		margin-top:0px; 
	}
	.top .text{
		width: 100%;
		height: 30px;
		margin-top:0px; 
		margin-left: 0;
		line-height: 30px;
	}
	.top{
		width: 90%;
		height:auto;
		margin-left: 5%;
		margin-top:3px;
		border-left:1px dashed #999;
		border-right:1px dashed #999;
		margin-bottom: 1%;
	}

	.button{
		width: 80%;
		height: 80%;
		border-radius: 9px 9px;
		background: #87CEFF;
		border: 0.5px solid  #87CEFA;

	}
	.frozen{
		width: 80%;
		height: 80%;
		border-radius: 9px 9px;
		background: #87CEFF;
		border: 0.5px solid  #87CEFA;

	}
</style>
<script src="http://www.jq22.com/jquery/1.4.4/jquery.min.js"></script>
</block>
<block name="body">


<div style="width:90%;margin:auto;margin-top:5%">



	<empty name="list">
		<table class="table" width="100%" border="1" bordercolor="#EDEDED" cellspacing="0" cellpadding="0" >
			<thead bgcolor="#F8F8FF" style="font-weight: 900;">
				<tr height="30">
					<td>订单号</td>
					<td>收款方</td>
					<td>总金额</td>
					<td>获得分润</td>
					<td>状态</td>
				</tr>
			</thead>
			<tbody>
				<tr height="30">
					<td colspan="5">还没有成员哦，快去使用推广码添加吧!</td>
					
				</tr>
			</tbody>


		</table>

	<else/>
		<table class="table" width="100%" border="1" bordercolor="#EDEDED" cellspacing="0" cellpadding="0" >
			<thead bgcolor="#F8F8FF" style="font-weight: 900;">
				<tr height="30">
					<td>订单号</td>
					<td>收款方</td>
					<td>总金额</td>
					<td>获得分润</td>
					<td>状态</td>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
					<tr height="30" style="font-size:11px;">
						<td >{$vo.trade_no}</td>
						<td>{$vo.shou}</td>
						<td>{$vo.total}</td>
						<td>{$vo.divide}</td>
						<td>
							<php>if($vo['status']==1){
								echo "已分润";
							}else{
								echo "未分润";
							}</php>
						</td>
					</tr>
				</foreach>
			</tbody>


		</table>
		

	</empty>


<div class="page"  style="float:left;width:auto;height:30px;opacity:1;position:relative">{$_page}</div>
</div>
		

	

</block>



<block name="script">
	<script type="text/javascript">
		$('.button').click(function(){

			var _this=$(this);
			var text=_this.html()
			var uid=_this.parent().parent().find('.uid').val();
			if(text=='关闭'){
				var status=1;
			}else{
				var tatus=0;
			}
			$.ajax({
				type:'post',
				data:{'uid':uid,'status':status},
				url:"{:U('team')}",
				success:function(m){
					if(m==1){
						// 成功
						if(status==1){
							_this.html('开启')
						}else{
							_this.html('关闭')
						}
						
					}else{
						// alert(m)
						alert('修改失败')
					}
				}
			})
		})

		$('.frozen').click(function(){

			var _this=$(this);
			var text=_this.html()
			var uid=_this.parent().parent().find('.uid').val();
			if(text=='冻结'){
				var status=1;
			}else{
				var tatus=0;
			}
			$.ajax({
				type:'post',
				data:{'uid':uid,'status':status},
				url:"{:U('team2')}",
				success:function(m){
					if(m==1){
						// 成功
						if(status==1){
							_this.html('正常')
						}else{
							_this.html('冻结')
						}
						
					}else{
						// alert(m)
						alert('修改失败')
					}
				}
			})
		})








	</script>


	
</block>